<template>
  <div class="user-logo logo">
    <router-link :to="{name: home}">
      <img src="@/assets/images/logo.png" style="width:28px; height:auto;" v-if="!isDesktop()"/>
      <!-- <h1 class="title" v-if="showTitle">{{ title }}</h1> -->
      <div v-if="isDesktop()">
        <img src="../../../public/weblogo.png" style="width:100%;"/>
      </div>
    </router-link>
  </div>
</template>

<script>
import LogoSvg from '@/assets/logo.svg?inline'
import base from '@/config/baseUrl'
import { mixin, mixinDevice } from '@/utils/mixin'

export default {
  name: 'Logo',
  components: {
    LogoSvg
  },
  mixins: [mixin, mixinDevice],
  data () {
    return {
      home: base.home
    }
  },
  props: {
    title: {
      type: String,
      default: '智慧溆浦·智慧医疗',
      required: false
    },
    showTitle: {
      type: Boolean,
      default: true,
      required: false
    }
  }
}
</script>
<style type="less">
  .user-logo {
  background: rgba(4,88,229,1)!important;
}
.title {
  color: #fff!important;
}
</style>
